﻿<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>大春哥-电脑端微信聊天窗口界面代码</title>

    <link rel="stylesheet" href="./font/iconfont.css">
    <link rel="stylesheet" href="css/reset.min.css">
    <link rel="stylesheet" href="css/style.css">

</head>

<body>
    <div class="wrapper">
        <div class="container">
            <!-- 左侧列表 -->
            <div class="left">
                <!-- 搜索框 -->
                <div class="top">
                    <div class="user">
                        <img class="user-img" src="./img/1.jpg" alt="">
                        <span class="nick">大春哥</span>
                    </div>
                    <input type="text" placeholder="Search" />
                   
                </div>
                <!-- 用户列表 -->
                <ul class="people">
                    <li class="person" data-chat="person1">
                        <img src="./img/1.jpg" alt="" />
                        <span class="name">李狗蛋</span>
                        <span class="time">2:09 PM</span>
                        <span class="preview">肥是一种精神，肉是一种态度</span>
                        <span class="tip" data-num="0" style="display: none">1</span>
                    </li>                
                </ul>
            </div>
            <!-- 右侧聊天窗口 -->
            <div class="right">
                <!-- 当前聊天用户信息 -->
                <div class="top"><span>To: <span class="name">Dog Woofson</span></span></div>
                <!-- 聊天内容 -->
                <div class="chat" data-chat="person1" style="display: block">
                    <div class="items">
                        <!-- 时间
                        <div class="conversation-start">
                            <span>Today, 5:38 PM</span>
                        </div> -->
                        <!-- 一条消息 -->
                        <div class="item">
                            <img src="./img/2.jpg" class="portrait">
                            <div class="bubble m-l">
                                Hello, can m-l hear m-r?
                            </div>
                        </div>
                      
                        <div class="item item-r">
                            <img src="./img/2.jpg" class="portrait">
                            <div class="bubble m-r">
                                ... about who we used to be.
                            </div>
                        </div>                       
                    </div>
                </div>
                <!-- 用户输入 -->
                <div class="write">
                    <!-- 工具条 -->
                    <div class="tool">
                        <a href="javascript:;" class="write-link iconfont icon-file"></a>
                        <a href="javascript:;" class="write-link iconfont icon-biaoqing"></a>
                        <a href="javascript:;" class="write-link iconfont icon-liaotianjilu"></a>
                    </div>
                    <!-- 输入框 -->
                    <textarea id="input"></textarea>
                    <!-- 发送按钮 -->
                    <button class="send">发送</button>
                </div>
            </div>
        </div>
        <div class="win-box">
            <h2 class="h2-title">局域网聊天系统</h2>
            <div class="avators">
                <img src="./img/1.jpg" class="active" alt="">
                <img src="./img/2.jpg" alt="">
                <img src="./img/3.jpg" alt="">
                <img src="./img/4.jpg" alt="">
                <img src="./img/5.jpg" alt="">
                <img src="./img/6.jpg" alt="">
                <img src="./img/7.jpg" alt="">
                <img src="./img/8.jpg" alt="">
                <img src="./img/9.jpg" alt="">
                <img src="./img/10.jpg" alt="">
                <img src="./img/11.jpg" alt="">
                <img src="./img/12.jpg" alt="">
                <img src="./img/13.jpg" alt="">
                <img src="./img/14.jpg" alt="">
                <img src="./img/15.jpg" alt="">
                <img src="./img/16.jpg" alt="">
            </div>
            <div class="info">
                <input type="text"  id="ip" placeholder="ip" value="127.0.0.1">
                <input type="text"  id="port" placeholder="端口" value="9999">
                <input type="text" id="nick" placeholder="昵称" value="电脑">              
                <a href="#" id="login"><span>登陆</span></a>
            </div>

        </div>
    </div>
    <script type="text/html" id="tmp-list">
        {{ each list v i }}
            <li class="person" data-id={{ v.socketId}} >
                <img src="./img/{{ v.imgId }}.jpg" alt="" />
                <span class="name">{{ v.nick }}</span>
                <span class="time">2:09 PM</span>
                <span class="preview">肥是一种精神，肉是一种态度</span>
                <span class="tip" data-num="0" style="display: none">1</span>
            </li>      
        {{ /each }}
    </script>

    <script type="text/html" id="tmp-msg">
        {{ each list v i }}
            {{ if v.state == 1}}
                <div class="item">
                    <img src="./img/{{ imgId }}.jpg" class="portrait">
                    <div class="bubble m-l">
                       {{ v.txt }}
                    </div>
                </div>
            {{ else }}
                <div class="item item-r">
                    <img src="./img/{{ imgId }}.jpg" class="portrait">
                    <div class="bubble m-r">
                        {{ v.txt }}
                    </div>
                </div>  
            {{ /if }}        
        {{ /each }}
    </script>

    <script src="./js/socket.io.js"></script> 
    <script src="./js/jquery-1.12.4.js"></script>
    <script src="./js/template-web.js"></script>
    <script src="js/index.js"></script>


    

</body>

</html>